home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Astound 5.0
/
Astound v5.0 (R0202-30-500-0)(Astound, Inc.)(1998).iso
/
CAMBIUM
/
SDCHOICE
/
ACM
/
SETUP.MST
< prev
next >
Wrap
Text File
|
1998-02-27
|
6KB
|
217 lines
'**************************************************************************
'* VfW 1.1 Runtime Setup
'**************************************************************************
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'mscpydis.inc' ''System
'$INCLUDE 'msdetect.inc' ''Detects Avalilable Disk Space
''Dialog ID's
CONST WELCOME = 100
CONST ASKQUIT = 200
CONST EXITFAILURE = 400
CONST EXITQUIT = 600
CONST EXITSUCCESS = 700
CONST APPHELP = 900
CONST CHECK = 2500
CONST SMALLWIN = 2200
CONST RESTART = 2600
CONST RESTARTII = 2700
''Bitmap ID
CONST LOGO = 1
GLOBAL SizeReq& '' Total Disk Size required for installation
''File Types
GLOBAL WinDir$
GLOBAL WinSysDir$
GLOBAL WINDRIVE$ ''Windows Drive Letter.
GLOBAL CHECKSTATES$
DECLARE SUB Install
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE fUNCTION ExitWindowsExec LIB "User" (Exec$, Param$) AS INTEGER
INIT:
CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
WIN32ENABLED% = 0
MajorVer% = GetWindowsMajorVersion()
MinorVer% = GetWindowsMinorVersion()
IF MajorVer% < 3 OR (MajorVer% = 3 AND MinorVer% < 10) THEN
i% = DoMsgBox("Microsoft Windows version 3.10 or greater is required for this software. Please upgrade your version of Windows.", "Installation Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
END
END IF
SetBitmap CUIDLL$, LOGO
SetTitle "Audio Compression Manager Runtime"
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
END IF
ReadInfFile szInf$
WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
WELCOME:
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO WELCOME
END IF
''Prepare Copy list and check size
ClearCopyList
SrcDir$ = GetSymbolValue("STF_SRCDIR")
WinDir$ = GetWindowsDir()
DEST$ = GetWindowsDir()
WinSysDir$ = GetWindowsSysDir()
'' Runtime files (on Windows disk)
AddSectionFilesToCopyList "VfW Runtime", SrcDir$, WinSysDir$
AddSectionFilesToCopyList "ACM Drivers", SrcDir$, WinSysDir$
'' Check windrive diskspace
SizeReq& = GetCopyListCost ("","", "")
IF SizeReq& <> 0 THEN
GOSUB SMALLWIN
END
END IF
Install
'' Restart Windows: if it has to updates ACM from DOS, it restarts Windows automatically
'' else, it gives the user the choice
RESTRT% = RestartListEmpty ()
Exe$ = DEST$ + "\_msrstrt.exe"
Batch$ = DEST$ + "\_mssetup.bat"
empty$ = ""
RESTART:
IF RESTRT% = 0 THEN
sz$ = UIStartDlg(cuidll$, RESTART, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO RESTART
ENDIF
I% = ExitExecRestart ()
RemoveFile Exe$, cmoForce
RemoveFile Batch$, cmoForce
END
ELSE
sz$ = UIStartDlg(CUIDLL$, RESTARTII, "FQuitDlgProc", 0, "")
IF sz$ = "CONTINUE" THEN
I% = ExitWindowsExec (Exe$, empty$)
IF I% = 0 THEN
GOTO RESTART
ELSE
END
ENDIF
ELSEIF sz$ = "EXIT" THEN
UIPopAll
END
ELSEIF sz$ = "REACTIVATE" THEN
GOTO RESTART
ELSE
UIPop 1
END IF
END IF
QUIT:
ON ERROR GOTO ERRQUIT
IF ERR = 0 THEN
dlg% = EXITSUCCESS
ELSEIF ERR = STFQUIT THEN
dlg% = EXITQUIT
ELSE
dlg% = EXITFAILURE
END IF
QUITL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO QUITL1
END IF
UIPop 1
END
ERRQUIT:
i% = DoMsgBox("An installation problem occured, call the product support service", "Setup Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
END
ASKQUIT:
sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
IF sz$ = "EXIT" THEN
UIPopAll
'' ERROR STFQUIT
END
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ASKQUIT
ELSE
UIPop 1
END IF
RETURN
SMALLWIN:
sz$ = UIStartDlg(CUIDLL$, SMALLWIN, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO SMALLWIN
END IF
UIPop 1
RETURN
'**
'** Purpose:
'** Performs all installation operations.
'** Arguments:
'** none.
'** Returns:
'** none.
'*************************************************************************
SUB Install STATIC
SetRestartDir WinDir$
CopyFilesInCopyList
''Updating WIN.INI and SYSTEM.INI
CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "WaveMapper", "msacm.drv", cmoOverwrite
CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "MSACM.msadpcm", "msadpcm.acm", cmoOverwrite
CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "MSACM.imaadpcm", "imaadpcm.acm", cmoOverwrite
CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "msacm.drv", "Microsoft Sound Mapper V2.01", cmoOverwrite
CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "msadpcm.acm", "Microsoft ADPCM Codec V2.01", cmoOverwrite
CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "imaadpcm.acm", "Microsoft IMA ADPCM Codec V2.01", cmoOverwrite
END SUB
'**
'** Purpose:
'** Appends a file name to the end of a directory path,
'** inserting a backslash character as needed.
'** Arguments:
'** szDir$ - full directory path (with optional ending "\")
'** szFile$ - filename to append to directory
'** Returns:
'** Resulting fully qualified path name.
'*************************************************************************
FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
IF szDir$ = "" THEN
MakePath = szFile$
ELSEIF szFile$ = "" THEN
MakePath = szDir$
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
MakePath = szDir$ + szFile$
ELSE
MakePath = szDir$ + "\" + szFile$
END IF
END FUNCTION